package com.geek.water.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/7/25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("role")
@ApiModel(description = "角色表")
public class Role implements Serializable {
    @ApiModelProperty("主键，自增角色ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("角色名称")
    @TableField("name")
    private String name;

    //一对多 关联权限
    @TableField(exist = false)
    private List<Permission> permissions;

}
